

<%@ page contentType="text/html"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<f:view>
    <html>
        <head>
            <title>Un formulaire d'inscription</title>
        </head>
        <body>
            <h:form>
                <h4>
                    Formulaire d'inscription.
                </h4>
                <table>
                    <tr>
                        <td>Prénom:</td>
                        <td>
                    <h:inputText value="#{PersonBean.prenom}" required="true"  id="prenom"/>
                            <h:message for="prenom"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Nom:</td>
                        <td>
                            <h:inputText value="#{PersonBean.nom}" required="true"  id="nom"/>
                            <h:message for="nom"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Sexe:</td>
                        <td>
                            <h:selectOneRadio value="#{PersonBean.genre}" required="true" id="genre" >
                                <f:selectItem itemLabel="Homme" itemValue="homme"/>
                                <f:selectItem itemLabel="Femme" itemValue="femme"/>
                            </h:selectOneRadio>
                            <h:message for="genre"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Date de naissance:</td>
                        <td>
                            <h:inputText value="#{PersonBean.datenaissance}" id="datenaissance" required="true" >
                                <f:convertDateTime pattern="MM-dd-yy"/>
                            </h:inputText>
                            (mm-dd-yy)
                            <h:message for="datenaissance"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Email:</td>
                        <td>
                            <h:inputText value="#{PersonBean.email}" required="true"
                                         validator="#{PersonBean.validateEmail}" id="email"/>
                            <h:message for="email"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Promo:</td>
                        <td>
                            <h:selectOneMenu value="#{PersonBean.promo}">
                                <f:selectItem itemLabel="L1-info" itemValue="L1-info"/>
                                <f:selectItem itemLabel="L2-info" itemValue="L2-info"/>
                                <f:selectItem itemLabel="L3-info" itemValue="L3-info"/>
                                <f:selectItem itemLabel="M1-info" itemValue="M1-info"/>
                                <f:selectItem itemLabel="M2-info" itemValue="M2-info"/>
                            </h:selectOneMenu>
                        </td>
                    </tr>
                </table>
                <p><h:commandButton value="Inscription" action="confirm" /></p>
            </h:form>
            <hr>
        </body>
    </html>
</f:view>